import React, { ReactNode } from 'react';
import { Tag } from 'antd';

interface VTagProps {
  text: ReactNode;
  color: string;
  extra: { [key: string]: any };
}
const VTag: React.FC<VTagProps> = props => {
  const { text, color, extra } = props;
  return text ? (
    <Tag color={color} {...extra}>
      {text}
    </Tag>
  ) : (
    <span>-</span>
  );
};

export default VTag;
